<!--Gets current page name for CSS styling of navbar -->
<?php $pageName = basename($_SERVER['PHP_SELF']); ?>
<br/>
<div id="nav">
    <div id="logo">
        <a <?php if ($pageName == "index.php") {
            echo 'class="current"';
        } ?> href="index.php"><img src="images/logo.png"/></a>
    </div>
    <div id="links">
        <?php
        if ($pageName == "admin.php") {
            echo '<h2>Administration - <em>Dashboard</em></h2>';
        } else if ($pageName == "customers.php") {
            echo '<h2>Administration - <em>Customers</em></h2>';
        } else if ($pageName == "products.php") {
            echo '<h2>Administration - <em>Products</em></h2>';
        } else if ($pageName == "orders.php") {
            echo '<h2>Administration - <em>Orders</em></h2>';
        } else if ($pageName == "stock.php") {
            echo '<h2>Administration - <em>Stock</em></h2>';
        } else {
            ?>
            <ul>
                <li><a <?php if ($pageName == "sale.php") {
                        echo 'class="current"';
                    } ?> href="sale.php">Sale</a></li>
                <li><a <?php if ($pageName == "accessories.php") {
                        echo 'class="current"';
                    } ?> href="accessories.php">Accessories</a></li>
                <li><a <?php if ($pageName == "gallery.php") {
                        echo 'class="current"';
                    } ?> href="gallery.php">Steamy Tees</a></li>
            </ul>
        <?php
        }
        ?>
        <?php include "userinfo.php"; ?>
    </div>
</div>
